[Bug]: Pre-existing log in with google account fails when creating a user (POST /api/v1/partner/users)

Repo: · Issue: #582 Status: Open · Priority: P2 Assignee: Martin Labels: bug

Description

Steps to reproduce

  1. In staging open use a new google account and click on log in via google
  2. You should reach a “Not allowed” message
  3. But the account is nonetheless created on supabase
  4. Try adding that user to a partner account (from ui or by calling POST /api/v1/partner/users)
  5. You never get a reset password email

Expected behavior

I expected that flow to work ok.

Actual behavior

The account is left in an unusable state

How to fix:

We need to modify the POST /api/v1/partner/users route so that if the user already exists on supabase the user creation flow still works.

AC

  • Flow has been modified
  • Tests have been added to check that this flow works correctly (not sure if it is possible because tests use mock auth)

Implementation Notes

Dash adds notes here while working

Link to people, meetings, dependent tickets